<?php

class Form_CreateEvent extends Zend_Form {
	
	public function init() {
		
		$this->setMethod ( 'post' );

                $decorator = array(
                                'ViewHelper',
                                'Errors',
                                array(array('data' => 'HtmlTag'), array('tag' => 'span', 'class' => 'data')),
                                array('Label', array('tag' => 'div'),
                                array(array('row' => 'HtmlTag'), array('tag' => 'span'))
                            ));


		$this->addElement ( 'radio', 'sport', array ('separator' => '&nbsp;', 'decorators' => $decorator, 'label' => 'Sport:', 'required' => true) );

                $this->addElement ( 'text', 'startDate', array ('autocomplete' => 'off', 'decorators' => $decorator, 'label' => 'Start Date:', 'filters' => array ('StringTrim' ),
                    'validators' => array (array ('StringLength', false, array (10, 10 ) ) ), 'required' => true )
                );
                $this->addElement ( 'text', 'startTime', array ('decorators' => $decorator, 'label' => 'Start Time:', 'filters' => array ('StringTrim' ),
                    'validators' => array (array ('StringLength', false, array (5, 5 ) ) ), 'required' => true )
                );
                $this->addElement ( 'text', 'team_0', array ('decorators' => $decorator, 'label' => 'Local:', 'filters' => array ('StringTrim' ),
                    'validators' => array (array ('StringLength', false, array (2, 30 ) ) ), 'required' => true )
                );
                $this->addElement ( 'text', 'team_1', array ('decorators' => $decorator, 'label' => 'Visitor:', 'filters' => array ('StringTrim' ),
                    'validators' => array (array ('StringLength', false, array (2, 30 ) ) ), 'required' => true )
                );
                $this->addElement ( 'text', 'competition', array ('decorators' => $decorator, 'label' => 'Competition:', 'filters' => array ('StringTrim' ),
                    'validators' => array (array ('StringLength', false, array (2, 30 ) ) ), 'required' => true )
                );
                $this->addElement ( 'text', 'location', array ('decorators' => $decorator, 'label' => 'Location:', 'filters' => array ('StringTrim' ),
                    'validators' => array (array ('StringLength', false, array (2, 30 ) ) ), 'required' => true )
                );
                $this->addElement ( 'text', 'tags', array ('decorators' => $decorator, 'label' => 'Tags:', 'filters' => array ('StringTrim' ),
                    'validators' => array (array ('StringLength', false, array (2, 100 ) ) ), 'required' => true )
                );

                $this->addElement ( 'submit', 'submit',
                        array ('label' => 'Create Event',
                             'class' => 'large') );

	}
}

